<form method = "POST">
    <input type="text" name="rating">
    <input type="text" name="rating1">
    <input type="submit" name="submit" value="Search">
</form>
<?php
$file_name = "../ptnhuan-web1/data/films.txt";
$film = array();
$file_part = realpath($file_name);
$file = fopen($file_part, "r");
$data = fgets($file);
while (!feof($file)) {
    $film[] = trim(fgets($file));
}
fclose($file);
?>
<?php foreach ($film as $line): ?>

    <?php if (!empty($line)): ?>
        <?php $flim = explode(";", $line); ?>
        <?php if (isset($_GET['uid'])): ?>
            <?php if ((int) $_GET['uid'] == (int) $films[4]): ?><br>
                <img src="../ptnhuan-web1/public/images/films/<?php echo $fiml[1] ?>">
                <?php echo $film[2]; ?>
                <?php echo $film[3]; ?>
                <?php echo $film[4]; ?>
                <a href="edit.php?if= <?php echo $film[0] ?>"></a>
            <?php endif; ?>

           <?php endif; ?>
       <?php endif; ?>
   <?php endforeach; ?>
